{extend name="base" /}
{block name="content"}
<div class="g-main">
    <div class="m-main-title">
        <div class="m-container-fluid">
            <a href="{:url('index/welcome')}"><i class="icon icon-home"></i>首页</a>
            <span class="icon-angle-right"></span>
            <span>商城</span>
            <span class="icon-angle-right"></span>
            <span>优惠券管理</span>
            <span class="icon-angle-right"></span>
            <span>优惠券管理</span>
            <span class="icon-angle-right"></span>
            <span>优惠券列表</span>
            <a class="u-flush"><i class="icon-repeat"></i></a>
        </div>
    </div>
    <div class="m-main-content">
        <div class="m-container">
            <table class="m-table">
               <tr>
                   <th>
                       <div class="m-options cf">
                           <div class="m-opts fl"><a href="{:url('add')}" class="u-btn"><i class="icon-plus"></i>添加优惠券</a></div>
                       </div>
                   </th>
               </tr>
           </table>
            <form class="layui-form m-list-form">
                <table class="m-table mt-10">
                    <tbody class="datas">
                        <tr>
<!--                        	<th width="5%" style="text-align: center;">选择</th>-->
                            <th width="5%">ID</th>
                            <th width="10%">优惠券名称</th>
                            <th width="7%">限制使用金额</th>
                            <th width="5%">冲抵金额</th>
                            <th width="5%">优惠券数量</th>
                            <th width="5%">剩余数量</th>
                            <th width="15%">有效期限</th>
                            <th width="8%">优惠券类别</th>
                            <th width="8%">优惠券类型</th>
<!--                            <th width="5%">状态</th>-->
                            <th width="10%">操作</th>
                        </tr>
                        {foreach name="data" item="v"}
                        <tr>
                            <td>{$v.id}</td>
                            <td>{$v.coupon_name}</td>
                            <td>{$v.limit_price}元</td>
                            <td>{$v.offset_price}元</td>
                            <td>{$v.number}张</td>
                            <td>{$v.surplus_number}张</td>
                            <td>{$v.pbegin_txt}   至  {$v.pend_txt}</td>
                            <td>{$v.class_txt}</td>
                            <td>{$v.type_txt}</td>
<!--                            <td>{$v.status_txt}</td>-->
                            <td class="m-opt">
                                <a href="{:url('add', ['id' => $v.id])}" title="编辑">编辑</a>
                                <a href="javascript:;" title="删除" class="u-del" data-id="{$v.id}">删除</a>
                                <a href="{:url('release', ['id' => $v.id])}" title="发劵" >发劵</a>
                            </td>
                        </tr>
                        {/foreach}
                        <tr>
<!--                        <td align="center"><input type="checkbox" value="1" lay-skin="primary" lay-filter="select_ids" /></td>-->
<!--                        <td colspan="10" class="m-options"><button class="u-btn u-batch-del"><i class="icon-trash"></i>批量删除</button></td>-->
                    </tr>
                    </tbody>
                </table>
            </form>
            {include file="public:page" /}
        </div>
    </div>
</div>
{/block}
{block name="extrajs"}

{include file="laypage" /}
{/block}